/**
 * Anderground project - Subway maps processor application.
 * Copyright (C) 2008-2009 Eldar Abusalimov, Ilya Shurigyn
 * 
 * This file is part of Anderground.
 * 
 * Anderground is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * Anderground is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Anderground.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.anderground.modules.storage.xml;

import java.io.File;
import java.io.InputStream;

import org.anderground.core.model.ModelData;
import org.anderground.core.storage.ModelReader;
import org.anderground.modules.storage.AbstractStreamReader;

/**
 * Uses XML file format as a source.
 * 
 * @author Eldar Abusalimov (eldar.abusalimov@gmail.com)
 */
public abstract class XmlModelReader extends AbstractStreamReader<ModelData>
		implements ModelReader {

	/**
	 * Constructs a new {@link XmlModelReader} that uses the specified
	 * {@link File} for the future reading.
	 * 
	 * @param file
	 *            the file to read a data from
	 */
	public XmlModelReader(File file) {
		super(file);
	}

	/**
	 * Constructs a new {@link XmlModelReader} that uses a {@link File}
	 * created by converting the specified path string.
	 * 
	 * @param path
	 *            the path of a file to read a data from
	 */
	public XmlModelReader(String path) {
		super(path);
	}

	/**
	 * Constructs a new {@link XmlModelReader} that uses the specified
	 * {@link InputStream} for the future reading.
	 * 
	 * @param inputStream
	 *            the stream to read a data from
	 * @param closeAfterRead
	 *            defines whether to close the stream after {@link #read()}
	 *            completes
	 */
	public XmlModelReader(InputStream inputStream, boolean closeAfterRead) {
		super(inputStream, closeAfterRead);
	}

}
